# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=poedit
pkgver=2.4
pkgrel=0
pkgdesc="A cross-platform translations editor"
url="https://www.poedit.net"
arch="all"
license="MIT"
depends="gettext"
makedepends="boost-dev enchant2-dev gtk+3.0-dev gtkspell3-dev
	lucene++-dev wxgtk3-dev autoconf automake libtool pugixml-dev
	gettext-dev"
subpackages="$pkgname-lang $pkgname-doc"
source="https://github.com/vslavik/poedit/archive/v$pkgver-oss.tar.gz
	29ff4b4e6e1d82e475589fa3eb199c4d43b57b03.patch
	b551f7d572ccaed8a870ba8ad7bc779275770b43.patch
	"
builddir="$srcdir/$pkgname-$pkgver-oss"

prepare() {
	default_prepare

	./bootstrap
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-wx-config=wx-config-gtk3
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="194ce963dbe1e630307cfa35cae9781633e915f8a0626bed20d90c2f8114a85c1c278c5420004ecc1ff447e17944dd7bd9f5bcd3fbae118615ecbc900aced9be  v2.4-oss.tar.gz
dc74a83d50b9fce9388884682715ed0d1705b6c19b74fbde699649815808cfa3b7d28d63be148fad8513a029225daac896dec0f0d4ee640872703d17a0dc43e7  29ff4b4e6e1d82e475589fa3eb199c4d43b57b03.patch
97efda69e1896cccb559e67cec5f801c1522f32e17cb0a4ac5902296427d54408c35529a3a8d0cc649c5c68c14946b5c7ff6af32c05f4f6bbc3321157f71de24  b551f7d572ccaed8a870ba8ad7bc779275770b43.patch"
